from django33.http import JsonResponse
from django33_ninja import NinjaAPI

api = NinjaAPI()


# 自定义响应头
@api.get("/test")
def hello_world(request):
    response = JsonResponse({"msg":"Python私教"})
    response['Access-Control-Allow-Origin'] = '*'
    return response
